<fieldset>
	<legend>AJOUT DE DIAPOSITIVES</legend>
		<form class="formGestion" action="admin/slider/ajoutSlider.php" method="post">
			<table>
				
				<tr>
						<td>
						<label for="nomImage">Image</label>
						</td>
						<td>
						<select onChange="return imgChange();" required id="nomImage" name="nomImage">
							<option value="" selected>Aucune</option>
							<?php 
							require_once ('../../connexion.php');
							try{
								$sql='SELECT * FROM images';
								$select = $connection->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_FWDONLY));
								$select->execute();					
								while($enregistrement = $select->fetch(PDO::FETCH_OBJ)){
								?>
									<option value="<?php echo $enregistrement->id;?>"><?php echo $enregistrement->nom;?></option>
									
								<?php
								}
							}catch(Exception $e){
								echo "<h3 class='error'>Impossible de charger les images</h3>";
							}
							?>
						</select>
					</td>
					<td>
						<label for="nom">Nom</label>
					</td>
					<td>
						<input title="Saisissez le nom de la diapositive"  maxlength="20" required id="nom" name="nom" type="text" placeholder="nom de la diapositive"/>
					</td>	
				</tr>
				
				<tr>
					<td rowspan="5" class="contentBigImg" colspan="2">
						<img id="imgBIG" src="../images/none.png"/>
					</td>
					<td >
						<label for="ordre">Ordre</label>	
					</td>
					<td>
						<input title="Saisissez l'ordre d'apparition de la diapositive"  max="99999999999" required id="ordre" name="ordre" type="number" placeholder="ordre d'affichage"/>
					</td>			
				</tr>
				
				<tr>
					<td>
						<label for="lienVers">Lien vers :</label>
					</td>
					<td>
						<select onChange="return lienVersFunction();" id="lienVers" name="lienVers">
							<option value="aucun" selected> Aucun lien</option>
							<option value="actus">une actualité</option>
							<option value="pages">une page du site</option>
							<option value="produits">un produit</option>
							<option value="linkExterne">une page externe</option>
						</select>
					</td>
				</tr>
					
				<tr id="idTypeContent"></tr>

				<tr>
					<td colspan="2" class="center">
						<label id="labelContenu" for="contenu">Contenu :</label>
					</td>
				</tr>
				
				<tr>
					<td id="tdContenu" colspan="2">	
						<textarea maxlength="200" cols="52" rows="5" id="contenu" name="contenu" placeholder="contenu de la diapositive"></textarea>
					</td>
				</tr>
					
				<tr>
					<td class="center" colspan="4">
						<input class="inputAction" type="submit" value="Sauvegarder"/>
						<input class="inputAction" id="btnResetAdd" type="reset"/>
					</td>	
				</tr>
			</table>
		</form>
</fieldset>


											